<template>
	<view class="content">
		<h1>首页</h1>
		<button @click="handleLogout">点击退出</button>
	</view>
</template>

<script>
	import {
		checkPage
	} from "@/config/login.js"
	import {
		STOREAGE
	} from "@/config/app.js"

	export default {
		data() {
			return {}
		},
		onLoad() {
			checkPage()
		},
		methods: {
			handleLogout() {
				uni.clearStorageSync(STOREAGE.TOKEN)
				uni.navigateTo({
					url: "/pages/login/login"
				})
			}
		}
	}
</script>

<style>
</style>